/*
 * Copyright © 2017 eqxiu.com 北京中网易企秀科技有限公司  All rights reserved.
 */
package cn.hermit.core;

/**
 * Map Entry definition used outside map.
 * 
 * @author Jack Gao (Chinese name : GAO JIANGUO, Email : linux.gjg@gmail.com)
 * @date 27 Jun, 2014
 */
public class Entry<K, V> implements java.util.Map.Entry<K, V> {

	private K key;

	private V value;

	public Entry(K key) {
		this.key = key;
	}

	public Entry(K key, V value) {
		this.key = key;
		this.setValue(value);
	}

	@Override
	public K getKey() {
		return key;
	}

	@Override
	public V getValue() {
		return value;
	}

	@Override
	public V setValue(V value) {
		this.value = value;
		return this.value;
	}

    @Override
    public String toString() {
        return key+"="+value;
    }
}